import {baseUrl} from '@/config/env';
import startSearchModel from "@/config/startSearchModel";


export default () => {
    return {
        index: true,
        submitText: '保存',
        size: 'default',
        labelWidth: 120,
        menuType: 'menu',
        align: 'center',
        menuAlign: 'center',
        menuPosition: "right",
        searchIndex: 2,
        searchMenuSpan: 6,
        searchIcon: true,
        addBtn: false,
        editBtn: false,
        delBtn: false,
        rowKey: "defDeploymentId",

        column: [
            {
                label: 'defDeploymentId',
                span: 12,
                prop: 'id',
                align: "left",
                editDisplay: false,
                addDisplay: false,
                hide: true
            },
            {
                label: '流程名称',
                prop: 'defName',
                span: 24,
                search: true,
                searchModel: startSearchModel.LIKE_RIGHT,
                rules: [{
                    required: true,
                    trigger: "blur",
                    message: "请输入流程名称"
                }]
            },
            {
                label: '流程标识',
                span: 24,
                prop: 'defKey',
                search: true,
                searchModel: startSearchModel.LIKE_RIGHT,
                editDetail: true,
                rules: [{
                    required: true,
                    trigger: "blur",
                    message: "请输入流程唯一标识"
                }]
            },
            {
                label: '流程类别',
                prop: 'defCategory',
                span: 24,
                type: "select",
                search: true,
                dicUrl: `${baseUrl}/startActCategoryApi/listCategory`,
                props: {
                    label: 'actCategoryName',
                    value: 'actCategoryCode',
                },
                rules: [{
                    required: true,
                    trigger: "blur",
                    message: "请输入流程类别"
                }]
            },
            {
                label: '状态',
                prop: 'procDefStatus',
                type: "select",
                span: 24,
                tag: true,
                tagProp: {
                    "0": {type: "primary"},
                    "-1": {type: "warning"},
                },
                dicData: [
                    {label: "激活", value: 0,},
                    {label: "挂起", value: -1,},
                ]

            }, {
                label: '流程版本',
                prop: 'defVersion',
                span: 24,

            },


            {
                label: '部署时间',
                prop: 'deployTime',
                span: 12,
                type: 'datetime',
                valueFormat: 'YYYY-MM-DD HH:mm:ss',
                format: 'YYYY-MM-DD HH:mm:ss',
                editDisplay: false,
                addDisplay: false
            }
        ]
    }
}
